#%%
import pickle
from sklearn import datasets
from sklearn import svm

#%%
iris = datasets.load_iris()
digits = datasets.load_digits()

print(digits.data)
digits.target
clf = svm.SVC(gamma=0.001, C=100.)

#%%
clf.fit(digits.data[:-1], digits.target[:-1])
# save model
s = pickle.dumps(clf)

#%%
clf.predict(digits.data[-1:])

#%%
clf2 = pickle.loads(s)
clf2.predict(digits.data[-1:])


#%%
